﻿<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Pzgl_PzRule_Grid.aspx.vb" Inherits="PubProject.Pzgl_PzRule_Grid"%>
<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title></title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<link rel="stylesheet" type="text/css" href="/_grid/map_grid.css">
		<link rel="stylesheet" type="text/css" href="/_nav/menu.css">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
		<link rel="stylesheet" type="text/css" href="/_controls/find/find.css">
		<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" src="/_nav/menu.js"></script>
		<script language="javascript" src="/Slxt/js/Public.js"></script>	
		<script language="javascript">
			//在线帮助文件
			var _MyHelpfile = "/Cbgl/Help/topics/财务人员/凭证管理.html";	
			function window.onload()
			{
			    if (document.all("__Application") && document.all("__Application").value == "0101")
			    {
			        _MyHelpfile = "/Slxt/Help/topics/财务管理/财务接口设置/设置凭证规则.html";
			    }	
               
			}
			
			//新增窗口
			function openAddWin(sSaletype)	
			{
			    var sPath = "Pzgl_PzRule_Edit.aspx?mode=1&CwztGUID=" + __CwztGUID.value +"&OperTypeGUID="+__OperTypeGUID.value + "&Application=" + escape(document.all("__Application").value) + "&funcid=" + document.all("__funcid").value;
			    var iX = 750;
				var iY = 510;
				OpenWin(sPath,iX,iY,0)
			}
			//修改窗口
			function openModiWin()	
			{
			    // 选中行对象数组
				//
				var arrTr = appGrid.frameElement.getSelected();
				if (!arrTr) return;
				
				// 打开第一个选中行
				//
				var oid = arrTr[0].oid;
				var sPath = "Pzgl_PzRule_Edit.aspx?mode=2&oid=" + escape(oid)+"&CwztGUID=" + __CwztGUID.value+"&OperTypeGUID="+__OperTypeGUID.value + "&Application=" + escape(document.all("__Application").value) + "&funcid=" + document.all("__funcid").value;	
				// 只需要修改这里即可
				var iX = 750;
				var iY = 510;
				OpenWin(sPath,iX,iY,0)
			}
			
			//修改窗口
			function openDelWin()  
			{
			    var oTr = appGrid.frameElement.getSelected();
    			
			    if (!oTr) return;
    						
			    var sGUID="";
			    var i=0;
			    var iLen=oTr.length-1;
			    for(i=0;i<=iLen;i++)
			    {
			      sGUID=sGUID+","+oTr[i].oid;
			    }
			     			
			    if (sGUID == "") return ;
			    
			    sGUID=sGUID.substring(1);
    			
			    if (window.confirm("确定要删除凭证分录信息？") == false) return ;
    			
			    var strReturn = "";
			    var sFile = "/PubProject/CWJK/Cwjk_XMLHTTP.aspx"
			    sFile += "?cwztguid=" + __CwztGUID.value;
			 
    			
			    strReturn = GetDataFromXMLHTTP(sFile,"CWJK_PzGz_FlMx_DEL","","",sGUID);
			    switch (strReturn)
			    {
				    case "DELOK":
					    appGrid.frameElement.Query();
					    break;
				    case "DELERROR":
					    alert("删除失败，请与系统管理员联系！");
					    break;
			    } 
			}         
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<table style="FONT-SIZE: 9pt" height="100%" cellSpacing="0" cellPadding="0" width="100%">
			<tr>
				<td>
					<table style="FONT-SIZE: 9pt" height="100%" cellSpacing="0" cellPadding="0" width="100%">
						<tr height="1">
							<td>
								<mnu:AppGridMenu id="appGridMenu" runat="server" />
							</td>
						</tr>
						<tr>
							<td>
								<cnt:AppGrid id="appGrid" runat="server" multiselect="true" Filter="<filter/>" />
							</td>
						</tr>
					</table>
				</td>
			</tr>			
		</table>
	</body>
</HTML>
